﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;

namespace Assets.Script
{
    public class SkinPanelView:UIBase
    {
        SkinPanelControl control;
        public Text zuanshiNumText, goldNumText,tipsText;
        public Button closeBtn,addZuanshiBtn;
        public Image showNoeSkinImg;
        public List<Button> qualityBtns = new List<Button>();
        public Transform skinTran;
        public GameObject skinObj;
        public GameObject tipsPanel;
        public override void Init()
        {
            control = new SkinPanelControl(this);
            base.Init();
        }
        public override void Update()
        {
            control.Update();
            base.Update();
        }

        internal void SatrtViedeo()
        {
            StartCoroutine(PlayeVideo());
        }
        IEnumerator PlayeVideo()
        {
            UIManager.Ins.OpenUI(UIName.AdvertisingPanel);
            yield return new WaitForSeconds(5.5f);
            UIManager.Ins.CloseUI(UIName.AdvertisingPanel);
            MessageCenter.Ins.BuredMess(MessId.RefureCurrencyData, new CurrencyData()
            {
                gold = 0,
                zuanshi = 5
            });
        }
    }
}
